<!-- 商户提现记录 -->
<div class="search">
  <nz-select style="width:100px;" [(ngModel)]="auditstatus" nzAllowClear nzPlaceHolder="审核状态" (ngModelChange)="searchData()">
    <nz-option *ngFor="let item of statuslist" [nzValue]="item.key" [nzLabel]="item.value"></nz-option>
  </nz-select>
  日期:
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="sdate" nzPlaceHolder="开始日期">
  </nz-date-picker>
  ~
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="edate" nzPlaceHolder="结束日期">
  </nz-date-picker>
  <a (click)="searchData()">查询</a>
</div>

<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading" [nzTotal]="total"
  [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize" (nzPageIndexChange)="searchData()"
  (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'1300px',y: '600px' }">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="150px">商户名称</th>
      <th nzWidth="200px">银行卡号</th>
      <th nzWidth="150px">开户行</th>
      <th nzWidth="150px">提现金额</th>
      <th nzWidth="150px">提现时间</th>
      <th nzWidth="150px">餐厅账户类型</th>
      <th nzWidth="150px">审核状态</th>
      <th nzWidth="150px">打款状态</th>
      <th nzWidth="150px">操作</th>
      
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td>{{data.merchantname}}</td>
      <td>{{data.BankCardNo}}</td>
      <td>{{data.Bank}}</td>
      <td>{{data.totalcase}}</td>
      <td>{{data.createTime | date:"yyyy/MM/dd HH:mm"}}</td>
      <td>{{data.type}}</td>
      <td>{{data.AuditStatus}}</td>
      <td [ngClass]="{'red':data.casestatus==='未打款'}">{{data.casestatus}}</td>
      <td> 
        <a *ngIf="data.AuditStatus=='审核中'" (click)="auditpass(data._id)">通过</a>&nbsp;
        <a *ngIf="data.AuditStatus=='审核中'" (click)="auditrefuse(data._id)">拒绝</a>&nbsp;
        <a *ngIf="data.AuditStatus=='审核通过'&&data.casestatus=='未打款'" (click)="cash(data._id)">打款</a>
        <span *ngIf="data.casestatus=='已打款'" >打款完毕</span>
    </tr>
  </tbody>
</nz-table>

<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>

<nz-modal [(nzVisible)]="isVisible" nzTitle="申请提现" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()"  nzWrapClassName="vertical-center-modal"
  [nzMaskClosable]="false" nzWidth="800">
  <div style="margin-bottom: 16px;">
      <nz-input-group nzAddOnBefore="最多可提现金额">
          <input type="text" nz-input [(ngModel)]="doc.balance">
        </nz-input-group>
    <nz-input-group nzAddOnBefore="提现金额">
      <input type="text" nz-input [(ngModel)]="cashmoney">
    </nz-input-group>
    <nz-input-group nzAddOnBefore="开户行">
        <input type="text" nz-input [(ngModel)]="doc.Bank">
      </nz-input-group>
      <nz-input-group nzAddOnBefore="银行卡号">
          <input type="text" nz-input [(ngModel)]="doc.BankCardNumber">
        </nz-input-group>
  </div>


  